<?php
/**
 * Created by PhpStorm.
 * User: zouhua
 * Date: 2018/4/17
 * Time: 22:50
 */

namespace app\commands;


use Yii;
use yii\console\Controller;

class MailController extends Controller {

    public function actionIndex() {
        $mailer = Yii::$app->mailer;
        $res = $mailer->compose()
            ->setFrom('postmaster@avhub8.com')
            ->setTo('zou.hua@qq.com')
            ->setSubject(time())
            ->setTextBody('Plain text content')
            ->send();
        var_dump($res);


    }
}